﻿<Window x:Class="RailwayCompany.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="520" Width="1150">
    <Canvas x:Name="TrainMap">
        <StackPanel Orientation="Horizontal">
            <Image Source="../Images/Bulgarian-Railroads.png" Width="780" Height="477"/>
            <StackPanel>
                <StackPanel Orientation="Horizontal" Margin="4,0,0,0">
                    <TextBlock Text="DepartureTime" Width="90"/>
                    <TextBlock Text="Route" Width="250"/>
                </StackPanel>
                <ListView Name="TrainsList">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBox Text="{Binding DepartureTime}" Width="90"/>
                                <TextBox Text="{Binding RouteStationNames}" Width="220"/>
                                <Button Content="Select" DataContext="{Binding RouteID}" Click="TrainSelect_Button_Click"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Station" Width="100"/>
                        <TextBlock Text="Arrive" Width="100"/>
                        <TextBlock Text="Depart" Width="100"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <ListView Name="TimeTableList">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Text="{Binding Station.StationName}" Width="90"/>
                                        <TextBox Text="{Binding ArrivalTime}" Width="90"/>
                                        <TextBox Text="{Binding DepartureTime}" Width="90"/>
                                    </StackPanel>
                                </DataTemplate>
                            </ListView.ItemTemplate>
                        </ListView>
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <ListBox Name="FirstStationListBox" ItemsSource="{Binding Stations}" DisplayMemberPath="StationName"/>
                    <ListBox Name="SecondStationListBox" ItemsSource="{Binding Stations}" DisplayMemberPath="StationName"/>
                    <Button Content="Search" Click="SearchButton_Click"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="4,0,0,0">
                    <TextBlock Text="DepartureTime" Width="90"/>
                    <TextBlock Text="Route" Width="250"/>
                </StackPanel>
                <ListView Name="DirectRoutesList">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBox Text="{Binding DepartureTime}" Width="90"/>
                                <TextBox Text="{Binding RouteStationNames}" Width="250"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackPanel>
        </StackPanel>
    </Canvas>
</Window>
